The invention relates to a data processor for processing the data relating to date such as day, month and year and, more particularly, to an electronic desk-top calculator capable of processing such date data.
A small-sized calculator for processing the date data such as a desk-top calculator has been presented for practical use, in which calculator the input date data inputted is processed on the basis of a difference of the inputted date from a reference date. When an unreal date, for example, the 13th month 1, 1978 or Feb. 29, 1978, is erroneously applied to the calculator, the calculator processes the data without checking such erroneous date data, and presents an erroneous result. One of the conventional calculators, which is directed to solve such a problem, successively compares day, month and year of the input data with the correct data stored in the calculator, for the purpose of checking whether the input date data exists or not. Specifically, whether the data relating to year is calculable or not in the calculator is first checked. Whether the data relating to month is within the range 1 to 12 or not is then checked. Finally, the data relating to day is checked on the basis of the results of the checks of year and month. In checking the day data, it is necessary to check whether the year data is a leap year or not to determine if February has the 29th day or the 28th day as the final day. Therefore, the conventional calculator must store a large amount of data for the comparing reference. This fact encumbers the improvement of the manufacturing cost and size of the data processor such as a desk-top calculator.